#include <iostream>
using namespace std;
#include <cstring>

void func(int val)
{
    cout << "val:" << endl;
}

void func(int *pVal)
{
    cout << "pVal:"<< endl;
}



int main()
{
    #if 0
    int a = 100;
    auto num = 888;
    cout << "num:" << num << endl;

    auto str = "hello world";
    cout << "str:" << str << endl;
    /* 建议少用auto；会增加同组开发人员的阅读难度*/
    #endif

    #if 0
    int num = 666;
    decltype(num) value = 777;

    string str = "hello world";
    decltype(str) ptr = "zhangsan";
    #endif

    #if 0
    func(0);
    /* 二义性*/
    func(NULL);
    func(nullptr);
    #endif

    /* 遍历*/
    int array[] = {2,4,556,76,5};
    for(int item : array)
    {
        /* item 已经是内部的元素了*/
        cout << item << endl;
    }


    return 0;
}